package com.ynny.fallback;

import org.springframework.stereotype.Component;

//@Component 指定类,自动扫描并实例化为 Bean
@Component
public class SentinelFallback {
    //Throwable 全局异常(父类)
    public static String rtFallback(Throwable e) {
        String msg = "进入慢调用降级,请稍后再试";
        System.out.println(msg);
        return msg;
    }

}
